﻿#ifndef CARANDQRCODEVERIFY_H
#define CARANDQRCODEVERIFY_H

#include <QWidget>
#include "Global.h"
#include "WidgetQrCode.h"

namespace Ui {
class CarAndQRCodeVerify;
}

class CarAndQRCodeVerify : public QWidget
{
    Q_OBJECT
    
public:
    QLabel* time;
    QLabel* signal;
    WidgetQrCode* qCode;
    QTimer* CheckAppOrSwipCard_ChargingType;
    QTimer* SwipCardMachine_Error;//监控读卡器故障的定时器
    QString Management_CardNum[5];//用于保存获取到的充电管理卡的卡号
    explicit CarAndQRCodeVerify(QWidget *parent = 0);
    err_record* cardrrorinfo;
    char frist_error;
    ~CarAndQRCodeVerify();
signals:
    void onsendQRCodeValue(QString Qrcode);
    void get_Manage_CardNum(QString *Management_CardNum);
    void _25Page_Swip(QString CardNum, int focus_gun_);
    void SwipCardMachine_Error_Signal();
    void appChargingDataUpdate(int focus_gun_);

private slots:
    void ChangeSwipPicture();
    void receiveCardInfo_25Page(QString cardNum, int value/*0刷卡成功,1刷卡失败*/, uint availabelMoney /*余额*/);
    void AppChargingSignalOrSwopCard_Received();
    void drawQR_emit();
    void drawQRCode(int current);
    void UserChooseChargingType(int current);
    void on_pushButton_clicked();

    void on_buttonUnlock_clicked();
    void on_VINcharge_clicked();
    void UnlockEnableSlot();

private:
    void AppChargingSignal();
    QTimer updateqr;
    Ui::CarAndQRCodeVerify *ui;
};

#endif // CARANDQRCODEVERIFY_H
